package com.pan.admin.module.visualizer.service.impl;

import com.pan.admin.module.visualizer.dao.ApiVisualizerDao;
import com.pan.admin.module.visualizer.entity.po.ApiLogVisualizerPO;
import com.pan.admin.module.visualizer.entity.po.ApiVisualizerPO;
import com.pan.admin.module.visualizer.entity.qo.ApiLogVisualizerQO;
import com.pan.admin.module.visualizer.entity.qo.ApiVisualizerQO;
import com.pan.admin.module.visualizer.service.ApiVisualizerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class ApiVisualizerServiceImpl implements ApiVisualizerService {

    @Autowired
    private ApiVisualizerDao apiVisualizerDao;

    @Override
    @Transactional(readOnly = true)
    public List<ApiVisualizerPO> listApiClientId(ApiVisualizerQO apiVisualizerQO) {
        return apiVisualizerDao.listApiClientId(apiVisualizerQO);
    }

    @Override
    @Transactional(readOnly = true)
    public List<ApiVisualizerPO> listFlow(ApiVisualizerQO apiVisualizerQO) {
        return apiVisualizerDao.listFlow(apiVisualizerQO);
    }

    @Override
    @Transactional(readOnly = true)
    public List<ApiVisualizerPO> listBill(ApiVisualizerQO apiVisualizerQO) {
        return apiVisualizerDao.listBill(apiVisualizerQO);
    }

    @Override
    @Transactional(readOnly = true)
    public List<ApiLogVisualizerPO> listApiLogCountByApiClientId(ApiLogVisualizerQO apiLogVisualizerQO) {
        return apiVisualizerDao.listApiLogCountByApiClientId(apiLogVisualizerQO);
    }
}
